package practise.interview;

/**
 * Created with IntelliJ IDEA.
 * User: xinlyu
 * Date: 7/12/12
 * Time: 11:21 AM
 * To change this template use File | Settings | File Templates.
 */
public class Fibonacci {
    static public void main(String[] args){
        Fibonacci fibonacci = new Fibonacci();
        System.out.println(fibonacci.fun(20));
    }

    public int fun(int n){
       if(n==0)
           return 0;
       if(n==1)
            return 1;
       return fun(n-1)+fun(n-2);
    }
}
